package com.itheima.StudenProject;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

public class Demo {
    public static void main(String[] args) {

        Random random = new Random();
        String s = "";
        for (int i = 0; i < 5; i++) {
            int i1 = random.nextInt(127);
            if (i1 == '0' || (i1 >= 'A' && i1 <= 'Z') || (i1 >= 'a' && i1 <= 'z')) {
                char c = (char) i1;

                s += c;
            } else {
                i--;
            }

        }
        System.out.println(s);

    }
}
